var mySwiper = new Swiper('.chatroom>.swiper-container', {
           // direction: 'vertical',
           // loop: true,
           slidesPerView:1.5,

           pagination : '.swiper-pagination',
          paginationClickable :true,
            onInit: function(swiper){
                console.log(swiper);
                swiperAnimate(swiper);
            },
            onSlideChangeEnd: function(swiper){
                console.log(swiper);
                swiperAnimate(swiper);
            },

          });
      var swiper = new Swiper('.content>.swiper-container', {
          pagination : '.swiper-pagination',
          paginationClickable :true,
             onInit: function(swiper){        //动画
                swiperAnimate(swiper);
            },onSlideChangeEnd: function(swiper){
                swiperAnimate(swiper);
            },onTransitionEnd: function(swiper){
                $('.navs').eq(swiper.activeIndex)   //跟着下标滑动
                .addClass('active')
                .siblings()
                .removeClass('active');

            }
        });
           //下标
            $('.navs').click(function(){
                $(this).addClass('active')
                .siblings()
                .removeClass('active');
                swiper.slideTo($(this).index(), 1000)
                 // console.log( swiper)
            });
            // $(".tinqi").click(function(){
            //   $("html").css({background:"#999"});
            // })
      $.ajax({
        type:"GET",
        url:"../json/awhile.json",
        async:true,
        success:function(res){
          console.log(res)
          var str = template('list_caidan',{sectionMain:res});
          $('.sectionMain').html(str);

        }

      });
  